!*************************************************************
! this subroutine calculate M a and Taccording V P Rg
!*************************************************************
! Created by : B. G.
! Date	    : 2015-08-11
! Revised    :
!*************************************************************
! Nomenclature :
!   Ptemp~Mtemp temporary variables, pressure dendity velocity
!               speed of sound temperature Mach number
!
!*************************************************************
! Warning :
!*************************************************************

subroutine Thermo(Ptemp,rhotemp,Vtemp,atemp,Ttemp,Mtemp)
   use VariableDef
   implicit none
   ! given variables
   real*8::Ptemp,rhotemp,Vtemp
   ! temporary variables
   ! real*8::
   ! calculated variables
   real*8::atemp,Ttemp,Mtemp
   
   Ttemp=Ptemp/(rhotemp*Rg)
   atemp=sqrt(g*Rg*Ttemp)
   Mtemp=Vtemp/atemp

end subroutine Thermo
